package fw.qaz.asmx.reader.dialog;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.support.annotation.Nullable;

public abstract class MyAlertBuilder
{
    public static void displayConfimDialog(Context cxt, int title, int msg,
            @Nullable DialogInterface.OnClickListener ocl,
            @Nullable DialogInterface.OnClickListener ocl2)
    {
        new AlertDialog.Builder(cxt)
                .setTitle(title)
                .setMessage(msg)
                .setPositiveButton(android.R.string.yes, ocl)
                .setNegativeButton(android.R.string.cancel, ocl2)
                .show();
    }

    public static void displayAlertDialog(Context cxt, int title, int msg,
            @Nullable DialogInterface.OnClickListener ocl)
    {
        new AlertDialog.Builder(cxt)
                .setTitle(title)
                .setMessage(msg)
                .setNeutralButton(android.R.string.yes, ocl)
                .show();
    }
}